package com.xiaotu.service.sw.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.util.StrUtil;
import com.xiaotu.dao.sw.SwErrorMapper;
import com.xiaotu.dto.SwErrorDto;
import com.xiaotu.model.SwErrorModel;
import com.xiaotu.service.sw.SwErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zhangxiao
 * @create 2021-09-02 18:26
 */
@Service
@Transactional
public class SwErrorServiceImpl implements SwErrorService {

    @Autowired
    private SwErrorMapper swErrorMapper;

    @Override
    public Object submitSwError(SwErrorDto swErrorDto) {
        SwErrorModel swErrorModel = new SwErrorModel();
        BeanUtil.copyProperties(swErrorDto, swErrorModel);
        return swErrorMapper.insert(swErrorModel);
    }

}
